package com.rk.kbk.dao;

import com.rk.kbk.model.Order;
import com.rk.kbk.model.SortBetween;
import com.rk.kbk.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @SortBetweenDao
 * @类型中间Dao
 * @version : Ver 1.0
 */
public interface SortBetweenDao extends JpaRepository<SortBetween, Long>,JpaSpecificationExecutor {
     List<SortBetween> findByOrders(Order orders);

     List<SortBetween> findByTypeAndShopAndOrdersIs(int type, User shop,Order orders);
     /**
      * 根据状态和订单号获取订单类型列表
      */
     List<SortBetween> findByTypeAndOrders(int type, Order orders);
}
